

package suncertify.Server;

import suncertify.shared.ConfigUI;
import suncertify.shared.RMIConfigController;
import java.awt.event.WindowEvent;
import java.awt.event.WindowStateListener;
import suncertify.shared.RMIConfigUI;

/**
 *
 * @author jshah
 */
public class RmiConfigDisplay implements Runnable{


    public void run(){

        RMIConfigController serverConfigController;
        serverConfigController = new RMIConfigController();
        RMIConfigUI serverConfig = new RMIConfigUI(serverConfigController);
        serverConfigController.setInstance(serverConfig);
        
        
        serverConfig.getClientConfigFrame().addWindowStateListener(new WindowStateListener(){

            public void windowClosed(WindowEvent e){
                RMIConfigController.showScreen = false;
                System.out.println("WINDOW CLOSING");
            }

            public void windowStateChanged(WindowEvent e) {
               
            }

        });
        while(RMIConfigController.showScreen){
            
        }

    }
}
